GtkScaleButton *button = GTK_SCALE_BUTTON (object);
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
- if (priv->icon_list)
- {
- g_strfreev (priv->icon_list);
- priv->icon_list = NULL;
- }
-
- if (priv->adjustment)
- {
- g_object_unref (priv->adjustment);
- priv->adjustment = NULL;
- }
-
- if (priv->autoscroll_timeout)
- g_source_remove (priv->autoscroll_timeout);
+ g_clear_pointer (&priv->icon_list, g_strfreev);
+ g_clear_object (&priv->adjustment);
+ g_clear_handle_id (&priv->autoscroll_timeout, g_source_remove);
G_OBJECT_CLASS (gtk_scale_button_parent_class)->finalize (object);
}